package com.xm.utils;

/**
 * @author 黄家伟
 * @mail huangwei_xm@163.com
 * @copyright <a href="http://www.huangwei.work">oneself</a>
 * @since 2021/4/24 22:47
 * @version v1.0.0
 * @description ObjectUtil描述如下
 * <pre>
 *    Objec工具类
 * </pre>
 */
public class ObjectUtil {

    /**
     * 是注解类或接口类
     * @param aClass
     * @return
     */
    public static boolean isAnnotationOrInterface(Class<?> aClass){
        return aClass.isAnnotation() || aClass.isInterface();
    }

    /**
     * 非注解类和非接口类
     * @param aClass
     * @return
     */
    public static boolean isNotAnnotationAndInterface(Class<?> aClass) {
        return !isAnnotationOrInterface(aClass);
    }

    public static boolean isNotEmpty(Object bean) {
        return !isEmpty(bean);
    }

    private static boolean isEmpty(Object bean) {
        return null == bean;
    }
}
